{{indexmenu_n>5}}

====== GNSS Setup ======

{{:opencpn:manual:1gps_status.png}}{{:opencpn:manual:course-up_0.png?nolink&28x28}}{{:opencpn:manual:gray-nogps.png}}{{:opencpn:manual:red-gps.png}}

FIXME  Review all of this.  Fix links. 

Below we describe only the basics of getting a gps up and running.

==== GPS vs GNSS ====

[[https://www.masterclock.com/company/masterclock-inc-blog/gps-vs-gnss|Understanding Positioning, Navigation and Timing Satellite Systems]]

A GNSS, or Global Navigation Satellite System, is a generic name for a group of artificial satellites that send position and timing data from their high orbits. The GPS, or Global Positioning System, is just one of the many different sets of satellites that can provide such data.

Most satellite navigation systems operate on similar principles. The satellites are arranged in controlled and carefully monitored orbits, which except for regional enhancements are chosen to ensure even coverage globally.


{{:opencpn:manual_basic:get_started:ui-panel-clean.jpg?700|}}


For a full description of all options read //[[:opencpn:opencpn_user_manual:options_setting|Options Setting]]// \\
\\
**Make sure your GPS is not being used by some other program!!!!** Only one program can at one time use the connection. when your GPS program is using the GPS, Opencpn will not be able to do the same. Please quit all other programs using the same connection.

**Make sure your GPS is set to output positions using the WGS 84 Geodetic Datum.** Less of an issue now, compared to 10 - 15 years ago. Some units can't be changed, and is permanently set to WGS 84. The BU-353 is one of those.

====  USE of GSV ====


The NMEA message GSV is now the only message used for the GPS Talker Id, to determine different GNSS systems "in View" and this information is used in the Dashboard instrument "GNSS Status".

Position fix as reported by e.g. RMC and GGA and can be a mix of, "the best of", different GNSS systems. According to the NMEA0183 standard using the Talker Id "GN" but OCPN don't differentiate for either of the used Talker Ids. 

GGA reports how many satellites are used for the position fix, i.e "Satellites in use". (Apart from the GSV "Satellites in view" divided per GNSS system.)

=== Prioritize for GGA when available ===

  * Change 4/12/2021 for next release: 
  * When GGA Sentence is available there is a change from "in View" to "in Use"
  * Now while using modern GNSS receivers when several GNSS system are available the use of NMEA sentences GSV has changed in its structure. There can be about twelve GSV message every second all including counts of satellites seen for each GNSS system. So numbers of satellites in view can alter between 1 to 14 or so.
  * The GGA sentence though is used to indicate satellites in use for the fix calculation. The talker is then GN, GNGGA, indicating several GNSS system are used for the fix.
  * Since both OCPN core and Dashboard now use both GGA and GSV simultaneously to catch satellites used for the upper right "GPS bar" and the instrument "GPS in view" the result is a frequent "jumping".
  * Next SignalK release will also include more reliable NMEA0183 GGA so OpenCPN's prioritization between "satellites in use" and "satellites in view".
  * Reason: New GNSS receivers message xxGSV and "Satellites in view" for each satellite system in a sequence that can make the GNSS status icon to flicker. Therefore it's better to favor "Satellites in use" from GGA when available.  "Satellites in use" (for the fix calculation) reports the counts of the "best" satellites from all available system used for the fix calculation
  * Change includes:

    Added a prioritizing so if GGA is present we prefer that before GSV for "satellites in use"
    Changed the Dashboard instrument label from "GNSS in view" to "GNSS in use" since that's what GGA reports.


===== GPS Devices =====

**[[:opencpn:supplementary_hardware:gps_devices|Matrix of GPS Devices]]**

**How to [[:opencpn:opencpn_user_manual:getting_started:gps_setup#linux|Install Linux gpsd]]**

**How to [[:opencpn:opencpn_user_manual:getting_started:gps_setup#mac_osx|Install MacOS GPS]]**

**How to [[opencpn:opencpn_user_manual:getting_started:gps_setup#mac_osx_bu353s4_detailed_version|Install MacOS + BU353s4 Detailed Version]]**

**How to [[opencpn:opencpn_user_manual:getting_started:gps_setup#mac_osx_bu353s4_user_experience|Install MacOS + BU353s4 User Experience]]**

**How to [[http://continuouswave.com/forum/viewtopic.php?t=4121&p=23725|Use Globalstar BU-353 GPS Receiver with Newer MacOS]]**

**How to [[http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=229&pcid=41|Find drivers for Globalstar BU-353]]**

**How to [[:opencpn:opencpn_user_manual:getting_started:gps_setup#windows_xp_vista_7_8|Method 1 -Install GPS Drivers for Windows XP Vista 7 8 10]]**

**How to [[:opencpn:opencpn_user_manual:getting_started:gps_setup#method_2windows_8_10_-tablets_notebooks_with_gnss_sensor|Method 2 - Windows 8 10 Tablets with GNSS Sensor]]**

**How to [[opencpn:supplementary_software:gps_software:win8_gnss_sensor|Use a Windows 8/10 GNSS Sensor if you have one!]]**

**How to [[:opencpn:supplementary_hardware:gps_u-blox|Install U-Blox GPS Recievers]]**

**How to [[:opencpn:opencpn_user_manual:getting_started:gps_setup#an_example_-_configuring_bu-353|Configure Windows BU-353 Comm Port]]**

**How to check if the Windows Comm Port Drivers are working?**

   * Use the manufacturers software (U-blox Center, GpsInfo, etc)
  * Install and run the manufacturers software (this is not the driver, that is installed already) for the device.
  * Use the manufacture software to check that the device is working properly.
  * Make note of the comm port being used, if applicable.
  * Then be sure to **turn off** the Manufacturer's Software as it has //captured the port//, such that the //port will **not** be available// to Opencpn.
  * [[:opencpn:opencpn_user_manual:getting_started:gps_setup#an_example_-_configuring_bu-353|Determine the Comm Port another way]] from "Example - Configuring BU-353".
  * Now that you have the comm port number, you are ready to configure OpenCPN.

**How to [[:opencpn:opencpn_user_manual:getting_started:gps_setup#how_to_configure_opencpn_connections|Configure Windows OpenCPN Comm Port Connections]]**

**How to [[:opencpn:opencpn_user_manual:options_setting#options_setting|Use Options > Connections to configure Devices]]**

**How to [[:opencpn:opencpn_user_manual:getting_around:gps_setup_and_status|Know the GPS is working]]?**

{{:opencpn:manual:gpsgrn.png?28x28}}GPS fix will turn green.

**After the GPS is Working**

**How to [[:opencpn:opencpn_user_manual:getting_around:right_click_menu|Use the Right Click Menu to "Move the boat here"]]?**

**How to [[:opencpn:opencpn_user_manual:toolbar_buttons:create_route|Create a Route in OpenCPN]]?**

**How to [[:opencpn:opencpn_user_manual:toolbar_buttons:create_route#activating_routes_and_active_route_console|Set the Route Active]]?**

**How to [[:opencpn:opencpn_user_manual:toolbar_buttons|Use the Toolbar Buttons]]?**

**How to [[:opencpn:opencpn_user_manual:toolbar_buttons:auto_follow|Turn on Auto Follow - Make the Chart Display follow the Boat Progress]]?**

**How to [[:opencpn:opencpn_user_manual:charts|Find and Install charts]]?**

===== Windows 10 / 11 =====

Windows 10 users generally must purchase a new GPS Puck specifically configured for Windows 10. For Example, the BU-353 which works with earlier versions of Windows does not work without an elaborate work around involving preventing automatic update of Prolific USB drivers by the OS. It is far easier and more reliable to simply purchase another Windows 10 compatible GPS Puck (similar to the BU-353 S4) and use the associated drivers.

=== Method One: Dedicated GPS & Driver. ===

Follow the notes below under [[:opencpn:opencpn_user_manual:getting_started:gps_setup#windows_xp_vista_7_8|Windows XP/7/8]]. \\

=== Method Two: GNSS Drive using GeolocationTCP ===

This Windows 10/8 Microsoft [[opencpn:supplementary_software:gps_software:win8_gnss_sensor|GeolocationTCP -GNSS drive]] by Petr Simon has been found to be very helpful. Also described more completely [[:opencpn:opencpn_user_manual:getting_started:gps_setup#method_2windows_8_10_-tablets_notebooks_with_gnss_sensor|See below -Method 2: Windows 10/8 Tablets & Notebooks with GNSS Sensor- GeolocationTCP]].

===== Windows XP/Vista/7/8 =====

Note that the extensive use of the cheap gps mouse BU-353 as an example below, should only be seen as an illustration. \\ To use OpenCPN with a GPS, a GPS receiver is needed.

There are a variety of possible choices for a GPS receiver:

  * A computer, such as a Sony Vaio P has a built in GPS receiver
  * A NMEA Expander to amplify a nmea stream to multiple listeners
  * A hand-held GPS receiver
  * A dedicated GPS receiver

The remainder of this section describes using OpenCPN with a dedicated GPS receiver, however, the instructions for a dedicated receiver will be similar for any serial/USB connected NMEA data stream.

==== Method 1: A Dedicated GPS Receiver & Driver ====

There are several companies making dedicated GPS receivers. The Supplementary Hardware section for GPS devices lists several manufacturers.

NMEA has traditionally been implemented as a serial protocol and therefore, even if a USB connection is used, there needs to be a USB to Serial Port conversion. The specific driver for the each GPS receiver will handle this conversion.

=== An Example - Configuring BU-353 ===

It is not necessary to use the installation disk to setup the BU-353. Following the steps listed below will result in the latest driver being installed.

== How to Install the Driver ==

  - Download the latest driver for Prolific - https://www.globalsat.com.tw/en/a4-10593/BU-353S4.html  or  http://www.ifamilysoftware.com/news37.html
  - Unzip and install the driver
  - Plug in the BU-353.
  - Start → (Right Click) My Computer → Properties → Hardware →Device Manager \\ or Start→Run devmgmt.msc
  - Expand Ports
  - Look for the “Prolific USB-to-Serial Comm Port” and note the com port number (e.g., COM4)

{{:opencpn:manual:devicemanager-1.jpg?nolink&410x610|devicemanager-1.jpg}}

== How to Determine the Comm Port ==

  - Right click on the “Prolific USB-to-Serial Comm Port”. Choose Driver
  - Select 4800 bits per second, 8 data bits, None parity, 1 stop bit, and None for Flow Control

{{:opencpn:manual:prolific.jpg?nolink&410x450|prolific.jpg}}

== How to Configure OpenCPN Connections ==

  - Start OpenCPN
  - Click on the Options Icon {{:opencpn:manual:settings.png?nolink&}}
  - Select "Connections", and "Add Connection" and "Serial"
  - Under "Data Port" select the Com port noted in #6
  - Choose OK
  - Select Auto Follow to center the map over your GPS location

=== Troubleshooting ===

There is a small LED located on the BU-353. If the LED is off there is no power being received. Check the connection.

If the LED is solid it indicates the BU-353 is searching for a GPS signal. Try moving the GPS receiver to a clear location.

If the LED is flashing it indicates the BU-353 has a position fix and is transmitting data.

  - Try viewing the NMEA data stream in OpenCPN. Choose Options→Connections→Show NMEA Debug Window
  - Alternatively, a diagnostic program is included on the installation CD called GPSInfo.exe. Launch this program to install the diagnostic utility.

If it appears that the NMEA data stream is being received, the most likely issue is that OpenCPN is not centered over your location. Click AutoFollow to center the map at your GPS location.

=== Known Issues ===

If you change the USB port for the GPS receiver Prolific will reassign the COM port number. This will require repeating steps 4-12 above. If you are having trouble with Prolific drivers and an Error Code, try reading this page [[http://www.ifamilysoftware.com/news37.html|http://www.ifamilysoftware.com/news37.html]]

On some computer / GPS receiver combinations when the computer resumes from Stand By the GPS receiver will no longer transmit its NMEA data stream, and only garbage instead of ASCII characters will be visible in the NMEA Data Stream Window. The red indicator led will not work. \\  \\ To change back to NMEA mode search for and download SIRFDemo.exe. \\ Unpack and start. Set correct Baud rate and and com port as above. \\ Click connect to data source button. Action → Switch to NMEA protocol, then exit. \\ There are many more settings available in SIRFDemo.exe

An alternative workaround for this issue is provided by using a COM port splitter such as XPort [[http://www.curioustech.net/xport.html|http://www.curioustech.net/xport.html]]

  - Download [[http://www.curioustech.net/xport.html|XPort]].
  - Unzip it to a folder of your choice
  - Double Click XPort.exe
  - Set the Baud Rate to 4800
  - Under Enable Ports add an entry for COM10
  - Click “Find GPS”. The port returned should match the port identified in Step #6 in the Configuring BU-353 Section
  - Select Prolific USB-to-Serial Comm Port in the check box section
  - Return to OpenCPN
  - Click on the ToolBox Icon {{:opencpn:manual:settings.png?nolink&}}
  - Select GPS

Under NMEA Data Source change the Com port to COM10

==== Method 2: Windows 8/10/11-Tablets & Notebooks with GNSS Sensor ====

=== GNSS Sensor ===

Windows with GNSS Sensor outputs Location/Sensor API data, but OpenCPN needs an NMEA data stream over a virtual serial port. In most cases the integrated GPS receivers just support the Windows Sensor API, the program below uses the API and produces NMEA sentences that OpenCPN can use.

=== Win 10/8 Tablet and Notebooks ===

Only if your Win 10/8 tablet or notebook has a **GNSS Sensor** and** turning on the GPS** in the OS doesn't seem to work, try this program. First make sure to

   - Turn ON Windows Location Service (Settings > Location Privacy Settings)
  - Turn ON the GPS device (Settings > Turn Wireless Devices On or Off)

Beware: Windows can and will use other location services such as WiFi and Cellular if the GPS is not available. This may lead to navigation errors.

=== GeolocationTCP ===

A small application that enables windows 8/10 tablets and notebooks (with a GNSS sensor) to use OpenCPN. Tested and GNSS sensor seems to be able to pick up the signal quite well. Find a more complete installation description here [[:opencpn:supplementary_software:gps_software:win8_gnss_sensor|GeolocationTCP with Win8 GNSS Sensor]]. Author Petr Simons Home page on bitbucket is now gone, so use the link above. See the Cruiser's Forum Thread [[http://www.cruisersforum.com/forums/showthread.php?p=1341714|How to use OpenCPN on a Windows Tablet]]

=== Test GPS sensor accuracy ===

When you get done, test your installation for gps accuracy. Especially moving slowly, check if the course is stable. Many internal gps chips are not up to the task. Takes a lot of smoothing on the side of the software in use. On many mobile devices with gps built-in) the gps must be switched off and connected to a nmea0183 gps data stream over wifi. Much more stable. Quality tablets and phones do not show this limitation.


===== Linux =====

To proceed, the "**user**" you use on your computer must belong to a **group**  that is allowed to open **serial connections**. This group is normally "**dialout**" on Debian based Linuxes, including Ubuntu, and "**uucp**" on Red Hat based distributions. Read more in //[[:opencpn:opencpn_user_manual:options_setting:connections#linux_serial_connections|Connections for Linux]]//. \\ Check your status by writing "groups" on a command line. The response will be all groups that the user belongs to. Make sure that "dialout" or "uucp" is included. If not, you have to add your user to this group. There are many ways to do this, one is to issue this command: \\ "sudo usermod -a -G dialout $USER". Logout of your current session for group changes to take effect. \\ This applies to many Debian based distributions, for other distros just drop the sudo and do the command as root, using "su". \\ All major Linux distribution includes a graphical user settings dialog, where adding a user to a group, could be fixed.

==== Two methods are available, direct connection or through gpsd. ====

== We start with gpsd. ==

  * Install the gpsd and gpsd-clients packages
<code>

$ sudo apt-get install gpsd gpsd-clients

</code>

  * Go to Options→ Connections→ Add Connection and select "Network" plus the GPSD radio button. Address should be "localhost" and DataPorts should be set to 2947.
  * On Ubuntu, that is really all you have to do, but see next point. When you plug in your gps this will trigger gpsd to start.
  * At least on Ubuntu 18.04, and other Debian based distros, there is one more step if you have a GPS with a Prolific chip, such as the popular BU353. The support for this chip is turned off by default. You have to edit the file "/lib/udev/rules.d/60-gpsd.rules". Find the paragraph regarding Prolific Technolog, near the beginning, and remove the "#" from the line starting "#ATTRS{idVendor}". Save and restart your computer.
  * "xgps" and "cgps" are clients that comes with the gpsd-clients package, and are useful for testing that the gps and gpsd is working properly. If xgps or cgps isn't working, it's a gps or gpsd problem, not an OpenCPN problem

== Direct connection. ==

  * Make sure that gpsd isn't running then connect your gps and start OpenCPN. On Ubuntu 12.04 the easiest way to achieve this is to uninstall gpsd.
  * By Ubuntu 18.04 it is possible for gpsd and direct connection to co-exist. Create a file called /etc/udev/rules.d/70-opencpn.rules with the following contents:

KERNEL=="ttyUSB*", MODE="0666" \\ KERNEL=="ttyACM*", MODE="0666" \\ KERNEL=="ttyS*", MODE="0666"

  * Make sure that owner, group and permissions are the same as the other files in the "rules.d" directory. Reboot.
  * In the Options→Connections → Add Connection, select "Serial".Set "dataPort to the port where you plugged in your gps. If you plugged in BU 353 this will probably be /dev/ttyUSB0.
  * Choose 4800 baud, unless you know that the gps is set to something else.
  * The gps should now work…if not, check the NMEA data stream window. If only binary garbage is visible, the gps has to be reset to NMEA mode, see more about this above in windows section. An alternative is to use gpsd, that will work with the gps in Sirf mode.
  * To do this in Linux for BU 353 as well as many other gps:es, make sure that gpsd is running and that the package "gpsd-clients" is installed. On Ubuntu 12.04 gpsd needs to be temporarily installed. Make sure to kill any instances of gpsd with the command:

<code>
 "sudo killall gpsd"

</code>

  * This command will put the GPS into NMEA mode.

<code>
  * $gpsctl -n

</code>

  * If that doesn't work, try

<code>
$ gpsctl -f -n /dev/ttyUSB0

</code>

  * This will force a low-level access, bypassing gpsd. For more information: $man gpsctl
  * More information is as always available through "man gpsctl" Close down OpenCPN before running gpsctl. \\  \\ None of this is normally noticed when using gpsd, as this program reads both NMEA and SIRF binary sentences.

==== More Linux hints ====

  * If you can't connect to a physical port, such as **/dev/ttyUSBO**, indicated by a line in the opencpn.log file. __Check that you, as a user, belong to the group "dialout".__  To see which groups you belong to, run the command "groups". Not all Linux distributions add the user to this group by default. To add yourself to the dialout group

<code>
"sudo usermod -a -G dialout $USER"

</code>

  * Check if gpsd is working:

<code>
$ ps aux | grep gpsd
nobody 12338 0.3 0.1 4124 1448 ? S<s 18:31 0:00 gpsd -F /var/run/gpsd.sock
you 12356 0.0 0.0 3036 800 pts/3 S+ 18:32 0:00 grep –color=tty -d skip gpsd

</code>

  * This or similar responses indicate that gpsd is running. If you only have something like the second line,…it is not running.
  * Run the command
<code>

"$ls -lrtd /dev/*|tail -10"

</code>

  * and see the 10 latest created device files. Run this just after plugin in your gps to see which device was created.
  * Determine which device your GPS is on your linux system by checking the startup. Look for a line that says something about GPS and /dev/ttyUSB# in the command "dmesg"
  * Or even better, after connecting a gps mouse, BU-353, we look for a dmesg by running this command.
<code>

$ dmesg | grep tty
and get this response back.
[13616.095305] usb 2-3: pl2303 converter now attached to ttyUSB0

</code>

  * Add a script to start gpsd, if this is not done by your distribution. I saved mine as startgps and set the executable attribute. Edit line 3 to match your device, ie /dev/ttyUSB0
<code>

#!/bin/sh
 sudo killall gpsd
 sudo gpsd -n -D 2 /dev/ttyUSB0

</code>

  * Run the script:

<code>
$ ./startgps

</code>

If this is a new installation, click on the Toolbox icon {{:opencpn:manual:settings.png?nolink&}}and configure your GPS source, chart directories, and other settings.

==== Other Distributions ====

  * Install gpsd from source. More information is available here: [[http://catb.org/gpsd/|http://catb.org/gpsd/]]

=== Udev Rules ===

  * If you have problem with, for example gps, connecting to different ports each time you restart udev is your friend.
  * udev supports persistent device naming, which does not depend on, for example, the order in which the devices are plugged into the system. The default udev setup provides persistent names for storage devices.
  * There is a lot about udev on the Internet. For OpenCPN specifics, read the cruisersforum.

=== Bluetooth GPS ===

More user experience of setting up bluetooth GPS are welcome, as the notes below just reflects a few users experience. Please use the Forum.

=== Ubuntu 10.10 and older. ===

If you have a bluetooth GPS you will need to first configure it through the standard Ubuntu Bluetooth "set up new device " proceedure. Once you have done that you will need to find what the address of the GPS is. To do that you run this command:
<code>

"sudo hcitool scan"

</code>

it will then start looking for the Bluetooth GPS and hopefully find your GPS. You should see something similar to:

<code>
Scanning …
00:1C:88:10:D3:4D    iBT-GPS

</code>

In this case I have a IBT-GPS at address 00:1C:88:10:D3:4D (Your GPS address will be different)

Next we have to bind the GPS address to a "virtual" device OpenCPN understands in this case rfcomm0. We do this with the following command:

<code>
sudo rfcomm bind /dev/rfcomm0 00:1C:88:10:D3:4D

</code>

Note put your GPS address in this line You should not have to run these commands each time your linux is restarted as it will remember your GPS address.

Now all you need to do is go into OpenCPN Toolbox and select GPS. Now in the NMEA Data Source options select from the pulldown menu: "**/dev/rfcomm0**", or write it in the box, if not present as an alternative.

That's it - you should now have a Bluetooth GPS Connected.

**Ubuntu**** 12.04**

-Pair GPS with bluetooth icon -break connection with bluetooth icon -get device id: sudo hcitool scan -get channel for gps: sdptool records 00:02:78:0A:4E:E9 (put your actual number here) -sudo gedit /etc/bluetooth/rfcomm.conf #edit rfcomm input file. Text should be:

<code>
# RFCOMM configuration file.
#
# $Id: rfcomm.conf,v 1.1 2002/10/07 05:58:18 maxk Exp $
# rfcomm0 {
# Automatically bind the device at startup
bind yes;

</code>

'

<code>
# Bluetooth address of the device
device xx:xx:xx:xx:xx:xx;

</code>

'

<code>
# RFCOMM channel for the connection
channel 1;#use channel number as provided by sdptool records XX:XX:XX:XX:XX:XX

</code>

'

<code>
# Description of the connection
comment "Your GPS Device Here";
}

</code>

'

<code>
sudo rfcomm release 0 (not strictly neccesary)

</code>

.

<code>
sudo rfcomm connect 0

</code>

You only need to to this once, not required if you reboot at this point).

<code>
…connected /dev/rfcomm0 to 00:00:00:00:00:00 (whatever)
Press CTRL-C for hangup

</code>

in a separate terminal, you can test the connection with

<code>
rfcomm show /dev/rfcomm0
…rfcomm0: 00:08:1B:14:18:B6 channel 1 connected [tty-attached]

</code>

Your bluetooth GPS should now be working in open CPN. Run

<code>
sudo opencpn

</code>

To check that it works (/dev/rfcomm0 under GPS NMEA data source). If it works, try running opencpn without sudo, chances are that you cannot see the gps. if this is the case, use the following fix:

<code>
sudo usermod -a -G dialout $USER ''

</code>

=== Fedora ===

Run

<code>
hcitool scan

</code>

to get the ID of your bluetooth gps device. Make a file "rfcomm.config" and put it in /etc/bluetooth.

This file is already present in Ubuntu, but needs editing for persistent connection.

<code>
# RFCOMM configuration file.
#
# $Id: rfcomm.conf,v 1.1 2002/10/07 05:58:18 maxk Exp $
#
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device XX:XX:XX:XX:XX:XX;
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment "Your GPS Device Here";
}

</code>

Change XX:XX:XX…. to your device ID Open Opencpn and write **/dev/rfcomm0**  as GPS NMEA device. Note that you can add it yourself by writing directly into the scroll down box. Permissions for **/dev/rfcomm0**  are for group "**dialou**t". Make sure you belong to that group. The command "groups" will show all the groups you belong to. Make sure that "gpsd" isn't running, issuing "killall gpsd" as root.

===== Mac OSX =====

Attaching a GPS device to a Mac is done via one of the USB ports. Whether using a device with its own USB lead or via a serial-USB adapter lead or an NMEA multiplexer with USB port, the appropriate OS X driver needs to be installed. Nearly all hardware uses one of just two chip makes: those from FTDI or Prolific. Both those companies make OS X drivers available on their web sites, but manufacturers of GPS devices usually package the driver with device.

When the driver is installed and the device connected, start OpenCPN, select the Options icon and click the Connections tab. Click "Add Connection". Select Serial. Open the "Dataport" menu & select the device from the list. It is not always obvious which is the correct one, but in general the device will have a name starting: "/dev/cu." or "/dev/tty.". Some manufacturers make it obvious, like "/dev/cu.MiniPlex-99000125", but others may be more generic, like: "/dev/cu.usbserial". Set the "Baud Rate" to 4800 and click "OK". If the correct selection has been made, you should see the GPS status icon change from red to green.

OpenCPN + BU353S4 + MAC OSX [[http://www.cruisersforum.com/forums/f134/opencpn-bu353s4-mac-osx-209987.html#post2759371|Cruiser Forum Post]]

  - Start OpenCPN
  - Click on the Options Icon
  - Select “Connections”, and “Add Connection” and “Serial”
  - Under “Data Port” select the port displaying the BU353
  - Check the baudrate is 4800
  - Choose OK

=== MAC OSX + BU353S4 Detailed Version ===

For those that want to following Patinka's method from #15 in this thread) Many thanks Chris!:

== Install the driver ==

  - Google "pl2303 mac" and download the driver from the Prolific website
  - Unpack the Zip file
  - Open the Installation Guide
  - Follow the directions in the first three sections (i.e. Introduction, System Requirements and Mac OSX Driver Installation)
  - Do not go any further in the Installation Guide!
  - Restart your machine

== Connect the GPS puck ==

You will probably need to use an adaptor to convert to USB-C as that is all the new Macbook Pros have. Run a System Report to make sure your Mac can see the GPS:

  - Click on the Apple Symbol at the top left of your screen
  - Select "About this Mac"
  - Select "System Report"
  - Under Hardware, select "USB"
  - Expand the USB devices until you see the one that says "USB-Serial Controller D" or similar. In my case I had to expand several "USB 3.1 Bus" options before I found it.
  - Click on the "USB-Serial Controller D" and the details will show in the bottom pane. It should show the manufacturer as Prolific Technology.

== Get the GPS running in OpenCPN ==

  - Start OpenCPN
  - Click on the Options Icon
  - Select “Connections”, and “Add Connection” and “Serial”
  - Under “Data Port” select the port displaying the BU353
  - Check the baudrate is 4800
  - Choose OK
  - Select "Show NMEA Debug Window" and check that a series of messages are scrolling by. These are the data flowing from the GPS to OpenCPN. Click the box again to turn it off.

== Final step ==

  - Take your Mac with the GPS connected outside and wait for 5-10 minutes for an initial position to be acquired.
  - You will have succeeded when the GPS "ball" changes to bars and goes from red to green.
  - Also the "Own Ship" icon will display at your location
  - Pat yourself on the back for being a Mac genius!

==Get clear open sky signal and wait for initialization==

  - The GPS puck (which I thought was more sensitive) could not recieve…(but cell phone easily gets a GPS fix
  - Solution: Take the laptop close to a window or take the computer & GPS outside and wait untilan initial position is acquired."


=== MAC OSX + BU353S4 User Experience ===

GPS Puck: [[https://www.globalsat.com.tw/en/product-199952/Cable-GPS-with-USB-interface-SiRF-Star-IV-BU-353S4.html|Globalstar BU353 s4]]

== Install Driver and identify ==

  * Download and install the driver. The file is not a zip-file, but a RAR-file. My mac would not open that, so I had to install "The unarchiver" from app store. After that installation went fine. I do not know if this has to be done. I installed it first because I thought the driver was the problem when the GPS-device did not appear in the drop-down menu.
  * Install the GPS driver for macOS: https://www.globalsat.com.tw/en/a4-10593/BU-353S4.html and connect the GPS device.
  * Open the Terminal app and issue the command:

<code>
  ls /dev/cu* (in words: char "l" + char "s", space, backslash+chars"dev"+backslash+chars"cu*")
  Type return.
   As an example only you will get something like this:
   Code:
   MacBook-Pro ~ % ls /dev/cu*
   /dev/cu.Bluetooth-Incoming-Port /dev/cu.XGPS160-459E56-SerialPo
   /dev/cu.Qstarz818XT-SPPslave /dev/cu.usbmodem00000000050B1
   /dev/cu.RO4800-BT-DevB
 </code>  
  
== Configure OpenCPN ==

  * Choose the guessed name of your GPS device including the prefix "/dev/cu." and write it into the dataport box of OpenCPN in Connections/Serial/ e.g. "/dev/cu.XGPS160-459E56-SerialPo" in this example.
  * This advice solved my problem. I was trying to guess the device name, but was unsuccessful. In my case the answer was "/dev/cu.usbserial-1410" and that I do not believe I would have guessed before next summer.....
  * Start OpenCPN and add this new connection. If the GPS antenna is not shown in the drop-down menu, which is the common problem shown in this tread, just enter the name you guess (as the example over shows you might have a couple of devices listed in the terminal app window). If it is wrong, just try another one that seems plausible.
  * Be aware (as it is also said earlier in this tread) that the BU353S4 is quite demanding in establishing the initial satellite fix. It was not sufficient for me to sit by the window where I earlier have experienced that GPS-signals are received. I needed to bring my mac out on the balcony. Fix was established after approximately five minutes. After that it was not so demanding and i kept the fix indoor.
  * Enjoy OpenCPN with GPS. I am looking forward to try it onboard when boating season starts
  * One key factor if you are using High Sierra or later: Since OS X High Sierra, you need to explicitly allow the drivers in the Security & Privacy pane of System Preferences. You will get a dialog System Extension Blocked during installation, which alerts you to approve the driver. https://www.mac-usb-serial.com/docs/support/troubleshooting.html



=== U-Blox (7) Drivers ===

[[http://www.cruisersforum.com/forums/f134/u-blox-7-drivers-199012.html#post2901915|U-Blox (7) drivers]]

  - U-Blox7 connected to my Macbook pro
  - Plug in the u-blox and after a shortwhile it started flashing a green LED.
  - OpenCPN Options > Connections
  - Under Data Port I selected the /dev with USBModem as the identifier.
  - The trick is getting the correct baud rate, advice on other blogs had anything from 4800 to 115200.
  - Try several baud rates, but 115200 worked and Ownship jumped to the correct position and GPS data started at the bottom of the display.


===== Virtualized Environments =====

Use of Virtualized Environments such as Parallels, VM, VirtualBox, etc to run an alternative version of Opencpn on your Mac or PC are beyond the scope of this section. However experienced users are invited to report the specifics about using USB ports with Virtual Configurations. Please be specific about the setup and software and explain how virtual USB ports work in that environment. These commenta will eventually make their way into this section.

It should be noted that each Virtual Software handles virtualization of USB and Sharing differently. This can affect the connection and reliability of the connection for GPS.

OpenCPN is user powered, so we depend on User's sharing their experiences. Please assist us.

==== Important next steps ====

  * [[:opencpn:manual_basic:user_interface|User Interface]]
  * [[:opencpn:manual_basic:toolbar:options]]


